cmake_minimum_required(VERSION 3.11)

# 获取程序名称--目录名称
get_filename_component(TragetName ${CMAKE_CURRENT_SOURCE_DIR} NAME)

# 设置进程名
project(${TragetName} LANGUAGES CXX)

# 设置头文件路径
include_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}/inc
        ${CMAKE_CURRENT_SOURCE_DIR}/src
)

# 使用通配符添加源文件
file(GLOB_RECURSE MAIN_SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp )



# 链接其他库
set(LIBS
        FWsyslog_cbb
        pthread
        dl
        FWSocket_cbb
        FWCamera_cbb
        rockchip_mpp
        rockchip_vpu
        utils
)

#-L
set(PROJECT_LIB_DIRECTORYS
        ${EXTERNAL_LIBRARIES}
)

#-I
set(PROJECT_INCLUDES
        ${PROJECT_INCLUDE_DIRS}
         ${CMAKE_CURRENT_SOURCE_DIR}/inc
         ${CMAKE_CURRENT_SOURCE_DIR}/src
)

ZHD_ADD_EXECUTABLE(TARGET ${PROJECT_NAME} SRCS ${MAIN_SOURCE_FILE}
        LIBDIR          ${PROJECT_LIB_DIRECTORYS}
        LIBS            ${LIBS}
        INCLUDES        ${PROJECT_INCLUDES}
        DESTINATION     bin
)
